package com.atzzy.ysmall.ysmall_productserviceimpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.atzzy.ysmall.ysmall_allService.ProductService.CategoryService;
import com.atzzy.ysmall.ysmall_beans.CategoryVo;
import com.atzzy.ysmall.ysmall_common.vo.R;
import com.atzzy.ysmall.ysmall_mapper.CategoryMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author JAVAZeng
 * @Date 2022/3/2 19:30
 * @Version 1.0
 */
@Service
@Component
public class CategoryServiceImpl implements CategoryService {

    @Resource
    private CategoryMapper categoryMapper;

    @Override
    public R listCategories() {
        List<CategoryVo> categoryVos = categoryMapper.selectAllCategories();
        return new R(201,"success",categoryVos);
    }
}
